package kii.utils
{
	import flash.net.URLRequest;
	import flash.net.URLVariables;
	
	public final class HTTP
	{
		public static function request(url:String,
									   params:Object = null,
									   method:String = 'get'):URLRequest
		{
			var data:URLVariables = new URLVariables;
			for ( var property:String in params)
				data[property] = params[property];
			var request:URLRequest = new URLRequest(url);
			request.method = method;
			request.data = data;
			return request;
		}
	}
}